<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="${pageContext.request.contextPath }/">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/updatePass.js"></script>
<title>Insert title here</title>
</head>
<body>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr> 
	          <td width="153" height="48"><img src="images/projectmanager.gif" width="153" height="48"></td>
	          <td background="images/maintitle-bg.gif">&nbsp;</td>
	          <td width="80"><img src="images/maintitle-right.gif" width="80" height="48"></td>
	      </tr>
	</table>
	<form action="UpdatePassWord" method="post" onsubmit="return ck()">
		<table align="center">
			<tr>
				<td height="40" align="right" width="200">原密码：</td>
				<td><input type="password" name="oldPass" id="oldPass" onblur="checkoldPass()"> </td>
				<td width="400" id="tdoldPass" style="color:red;">
					<c:forEach items="${errlist}" var="item">
						<c:if test="${item eq 1 }">*原密码不能为空</c:if>
						<c:if test="${item eq 9 }">*原密码不正确</c:if>
					</c:forEach>
				</td>
			</tr>
			<tr>
				<td height="40" align="right">新密码：</td>
				<td><input type="password" name="newPass" id="newPass" onblur="checknewPass()"> </td>
				<td id="tdnewPass" style="color:red;">
					<c:forEach items="${errlist}" var="item">
						<c:if test="${item eq 2 }">*新密码不能为空</c:if>
						<c:if test="${item eq 4 }">*新密码长度不符(6~18)</c:if>
						<c:if test="${item eq 6 }">*新密码不能是纯数字的,只能是数字和字符的组合</c:if>
						<c:if test="${item eq 8 }">*两次输入的密码不一致</c:if>
					</c:forEach>
				</td>
			</tr>
			<tr>
				<td height="40" align="right">确认密码：</td>
				<td><input type="password" name="conPass" id="conPass" onblur="checkconPass()"> </td>
				<td id="tdconPass" style="color:red;">
					<c:forEach items="${errlist}" var="item">
						<c:if test="${item eq 3 }">*确认密码不能为空</c:if>
						<c:if test="${item eq 5 }">*确认密码长度不符(6~18)</c:if>
						<c:if test="${item eq 7 }">*确认密码不能是纯数字的,只能是数字和字符的组合</c:if>
					</c:forEach>
				</td>
			</tr>
			<tr height="50">
				<td style="color:red;">
					<c:forEach items="${errlist}" var="item">
						<c:if test="${item eq 10 }">*密码修改成功</c:if>
						<c:if test="${item eq 11 }">*修改失败</c:if>
					</c:forEach>
				</td>
				<td colspan="2">
					<input type="submit" value="确认"> 
					<input type="button" value="返回" style="margin-left: 20px" onclick="location.href='userlistServlet'">
				</td>
			</tr>
		</table>
	</form>
</body>
</html>